package com.dao.impl;

import com.dao.UserDao;
import org.springframework.stereotype.Component;

@Component("userDao")//不加别名默认是 userDaoImpl
public class UserDaoImpl implements UserDao {
        @Override
        public boolean login(String username, String password) {
            if (username.equals("张三") && password.equals("123")){
                return true;
            }
            return false;
        }
        @Override
        public void insert(){
            System.out.println("添加用户信息");
        }
        @Override
        public void delete(){
            System.out.println("删除用户信息");
        }
        @Override
        public void update(){
            System.out.println("更新用户信息");
        }
        @Override
        public void select(){
            System.out.println("查询用户信息");
        }
}
